<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLinksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('links', function (Blueprint $table) {
            $table->increments('id');
            $table->string('link_name',50)->default('')->comment('网站名称');
            $table->string('link_url',150)->default('')->comment('网站链接');
            $table->string('link_desc')->default('')->comment('网站简介');
            $table->smallInteger('link_sort')->default(0)->comment('链接排序');
            $table->tinyInteger('link_status')->default(0)->comment('审核状态 0 未审核1审核');
            $table->index('link_status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('links');
    }
}
